package com.paytos.cuoheonline.common;

import java.util.Collection;

/**
 * 返回结果列表对象
 * @author: 彭伟煌(pengweihuang@xmutca.com)
 * @create: 2016-07-08 23:05
 */
public class Results<T> extends Result<Collection<T>> {

    /**
     * 分页对象
     */
    private Paging paging;

    public Results() {
        super();
    }

    public Results(int status) {
        setStatus(status);
    }

    public Results(String message) {
        setMessage(message);
    }

    public Results(int status, String message) {
        setStatus(status);
        setMessage(message);
    }

    public Results(int status, Collection<T> result) {
        setStatus(status);
        setResult(result);
    }

    public Results(int status, Collection<T> result, Paging paging) {
        setStatus(status);
        setResult(result);
        setPaging(paging);
    }

    public Results(int status, String message, Collection<T> result) {
        setStatus(status);
        setMessage(message);
        setResult(result);
    }

    public Results(int status, String message, Long timestamp, Collection<T> result) {
        setStatus(status);
        setMessage(message);
        setTimestamp(timestamp);
        setResult(result);
    }

    public Paging getPaging() {
        return paging;
    }

    public void setPaging(Paging paging) {
        this.paging = paging;
    }
}
